Python Workbook: Learn Python in one day and Learn It Well (Workbook with Questions, Solutions and Projects) (Learn Coding Fast Workbook 1) by Chan Jamie & Publishing LCF

Python Workbook: Learn Python in one day and Learn It Well (Workbook with Questions, Solutions and Projects) (Learn Coding Fast Workbook 1) by Chan Jamie & Publishing LCF

Author:Chan, Jamie & Publishing, LCF [Chan, Jamie]
Language: eng
Format: epub
Publisher: LCF Publishing
Published: 2019-08-16T16:00:00+00:00


(iii) from myfunctions import func1, func2

Question 18

import sys

if 'C:\\PythonFiles' not in sys.path:

sys.path.append('C:\\PythonFiles')

Chapter 8: Working with Files

Question 1

Create a text file called ch8q1.txt with the following text:

Top Students:

Carol

Zoe

Andy

Caleb

Xavier

Aaron

Ben

Adam

Betty

Write a simple program to read and display the first four lines from ch8q1.txt . The output should not have any blank lines between each line.

For this question, you can assume that ch8q1.txt is in the same folder as your .py file.

Question 2



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.